<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAbstractTransition Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractTransition Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QAbstractTransition class is the base class of transitions
between <a href="qabstractstate.html">QAbstractState</a> objects.
<a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a>.</p><p>Inherited by <a href="qeventtransition.html">QEventTransition</a> and <a href="qsignaltransition.html">QSignalTransition</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstracttransition.html#QAbstractTransition">__init__</a></b> (<i>self</i>, QState&#160;<i>sourceState</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qabstracttransition.html#addAnimation">addAnimation</a></b> (<i>self</i>, QAbstractAnimation&#160;<i>animation</i>)</li><li><div class="fn" />list-of-QAbstractAnimation <b><a href="qabstracttransition.html#animations">animations</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstracttransition.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>e</i>)</li><li><div class="fn" />bool <b><a href="qabstracttransition.html#eventTest">eventTest</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" />QStateMachine <b><a href="qabstracttransition.html#machine">machine</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstracttransition.html#onTransition">onTransition</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qabstracttransition.html#removeAnimation">removeAnimation</a></b> (<i>self</i>, QAbstractAnimation&#160;<i>animation</i>)</li><li><div class="fn" /><b><a href="qabstracttransition.html#setTargetState">setTargetState</a></b> (<i>self</i>, QAbstractState&#160;<i>target</i>)</li><li><div class="fn" /><b><a href="qabstracttransition.html#setTargetStates">setTargetStates</a></b> (<i>self</i>, list-of-QAbstractState&#160;<i>targets</i>)</li><li><div class="fn" />QState <b><a href="qabstracttransition.html#sourceState">sourceState</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractState <b><a href="qabstracttransition.html#targetState">targetState</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QAbstractState <b><a href="qabstracttransition.html#targetStates">targetStates</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qabstracttransition.html#triggered">triggered</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractTransition class is the base class of transitions
between <a href="qabstractstate.html">QAbstractState</a>
objects.</p>
<p>The QAbstractTransition class is the abstract base class of
transitions between states (<a href="qabstractstate.html">QAbstractState</a> objects) of a <a href="qstatemachine.html">QStateMachine</a>. QAbstractTransition is part
of <a href="statemachine-api.html">The State Machine
Framework</a>.</p>
<p>The <a href="qabstracttransition.html#sourceState-prop">sourceState</a>()
function returns the source of the transition. The <a href="qabstracttransition.html#targetStates-prop">targetStates</a>()
function returns the targets of the transition. The <a href="qabstracttransition.html#machine">machine</a>() function returns
the state machine that the transition is part of.</p>
<p>The <a href="qabstracttransition.html#triggered">triggered</a>()
signal is emitted when the transition has been triggered.</p>
<p>Transitions can cause animations to be played. Use the <a href="qabstracttransition.html#addAnimation">addAnimation</a>() function
to add an animation to the transition.</p>
<a id="subclassing" name="subclassing" />
<h3>Subclassing</h3>
<p>The <a href="qabstracttransition.html#eventTest">eventTest</a>()
function is called by the state machine to determine whether an
event should trigger the transition. In your reimplementation you
typically check the event type and cast the event object to the
proper type, and check that one or more properties of the event
meet your criteria.</p>
<p>The <a href="qabstracttransition.html#onTransition">onTransition</a>() function
is called when the transition is triggered; reimplement this
function to perform custom processing for the transition.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractTransition" />QAbstractTransition.__init__ (<i>self</i>, <a href="qstate.html">QState</a>&#160;<i>sourceState</i>&#160;=&#160;None)</h3><p>Constructs a new <a href="qabstracttransition.html">QAbstractTransition</a> object with the
given <i>sourceState</i>.</p>


<h3 class="fn"><a name="addAnimation" />QAbstractTransition.addAnimation (<i>self</i>, <a href="qabstractanimation.html">QAbstractAnimation</a>&#160;<i>animation</i>)</h3><p>Adds the given <i>animation</i> to this transition. The
transition does not take ownership of the animation.</p>
<p><b>See also</b> <a href="qabstracttransition.html#removeAnimation">removeAnimation</a>()
and <a href="qabstracttransition.html#animations">animations</a>().</p>


<h3 class="fn"><a name="animations" />list-of-QAbstractAnimation QAbstractTransition.animations (<i>self</i>)</h3><p>Returns the list of animations associated with this transition,
or an empty list if it has no animations.</p>
<p><b>See also</b> <a href="qabstracttransition.html#addAnimation">addAnimation</a>().</p>


<h3 class="fn"><a name="event" />bool QAbstractTransition.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="eventTest" />bool QAbstractTransition.eventTest (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This function is called to determine whether the given
<i>event</i> should cause this transition to trigger. Reimplement
this function and return true if the event should trigger the
transition, otherwise return false.</p>


<h3 class="fn"><a name="machine" /><a href="qstatemachine.html">QStateMachine</a> QAbstractTransition.machine (<i>self</i>)</h3><p>Returns the state machine that this transition is part of, or 0
if the transition is not part of a state machine.</p>


<h3 class="fn"><a name="onTransition" />QAbstractTransition.onTransition (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This function is called when the transition is triggered. The
given <i>event</i> is what caused the transition to trigger.
Reimplement this function to perform custom processing when the
transition is triggered.</p>


<h3 class="fn"><a name="removeAnimation" />QAbstractTransition.removeAnimation (<i>self</i>, <a href="qabstractanimation.html">QAbstractAnimation</a>&#160;<i>animation</i>)</h3><p>Removes the given <i>animation</i> from this transition.</p>
<p><b>See also</b> <a href="qabstracttransition.html#addAnimation">addAnimation</a>().</p>


<h3 class="fn"><a name="setTargetState" />QAbstractTransition.setTargetState (<i>self</i>, <a href="qabstractstate.html">QAbstractState</a>&#160;<i>target</i>)</h3><h3 class="fn"><a name="setTargetStates" />QAbstractTransition.setTargetStates (<i>self</i>, list-of-QAbstractState&#160;<i>targets</i>)</h3><h3 class="fn"><a name="sourceState" /><a href="qstate.html">QState</a> QAbstractTransition.sourceState (<i>self</i>)</h3><h3 class="fn"><a name="targetState" /><a href="qabstractstate.html">QAbstractState</a> QAbstractTransition.targetState (<i>self</i>)</h3><h3 class="fn"><a name="targetStates" />list-of-QAbstractState QAbstractTransition.targetStates (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="triggered" />void triggered ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the transition has been triggered
(after <a href="qabstracttransition.html#onTransition">onTransition</a>() has been
called).</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>